package com.runshu.newsmartark.mvp.model;

import com.runshu.newsmartark.base.MyApplication;
import com.runshu.newsmartark.common.ConstantUrl;
import com.runshu.newsmartark.entity.HwInfoUtils;
import com.runshu.newsmartark.entity.UserInfoEntity;
import com.runshu.newsmartark.mvp.contract.FaceCodeContract;
import com.runshu.newsmartark.network.netbean.HttpRequestParamsBuilder;
import com.runshu.newsmartark.network.netbean.ResponseBean;
import com.runshu.newsmartark.network.netinterface.BaseCallBack;

/**
 * Demo class
 *
 * @author yu
 * @date 2021/11/22
 * @decs：
 */

public class FaceCodeModel extends BaseModel implements FaceCodeContract.Model {
    @Override
    public void verifyFaceCode(String faceCode, BaseCallBack baseCallBack) {
        HttpRequestParamsBuilder builder = new HttpRequestParamsBuilder();
        builder.putParams("faceCode", faceCode);
        builder.putParams("customerId", HwInfoUtils.getCustomerId(MyApplication.getApplication()));
        builder.putParams("hospitalId", HwInfoUtils.getHospitalId(MyApplication.getApplication()));
        super.initDataFromServer(ConstantUrl.GET_Login, builder.build(),  UserInfoEntity.class, ResponseBean.RES_DATATYPE_BEAN, baseCallBack);

    }
}